home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-19 | 4.5 KB | 145 lines | [TEXT/MPS ] |
- //# Copyright: © 1993-94 by Apple Computer, Inc., all rights reserved.
- #ifndef _ARBITRAT_
- #define _ARBITRAT_
-
- #ifndef _ODOBJECT_
- #include "ODObject.idl"
- #endif
-
- //==============================================================================
- // Theory of Operation
- //==============================================================================
-
- /*
- The arbitrator is used to manage competition for facilities which can only
- be controlled by a single part at a time. These facilities are referred to
- as "focus types". An example is the keystroke focus. Keyboard events are
- sent to the part which has the keystroke focus. Another example is the menu
- focus. One part owns the menu bar at any time. Many focus types are related
- to event distribution, but focus types could also be associated with ports,
- for example.
-
- Rather than having an all-encompassing notion of "active" part, parts simply
- request ownership of a set of focus types. It is possible, in principle, to
- have one part receive keystroke events while another receives sound input,
- though the human interface guidelines may encourage parts to request and
- relinquish most focus types along with the menu focus.
-
- New focus types can be added. This might be done by a part handler which is
- associated with some exotic input device.
-
- Parts request ownership of a set of focus types. This is necessary to
- avoid deadlock.
-
- */
-
- //==============================================================================
- // Constants
- //==============================================================================
-
-
- //==============================================================================
- // Scalar Types
- //==============================================================================
-
- //=====================================================================================
- // Class defined in this interface
- //=====================================================================================
-
- interface ODArbitrator;
-
- //=====================================================================================
- // Classes used by this interface
- //=====================================================================================
-
- interface ODFocusModule;
- interface ODFocusSet;
- interface ODFocusOwnerIterator;
- interface ODSession;
- interface ODFrame;
-
- //=====================================================================================
- // Implementation Types
- //=====================================================================================
-
-
- //=====================================================================================
- // Global Variables
- //=====================================================================================
-
- //=====================================================================================
- // Class ODArbitrator
- //=====================================================================================
-
- interface ODArbitrator : ODObject
- {
- ODBoolean RequestFocusSet(in ODFocusSet focusSet,
- in ODFrame requestingFrame);
-
- ODBoolean RequestFocus(in ODTypeToken focus,
- in ODFrame requestingFrame);
-
- void RelinquishFocusSet(in ODFocusSet focusSet,
- in ODFrame relinquishingFrame);
-
- void RelinquishFocus(in ODTypeToken focus,
- in ODFrame relinquishingFrame);
-
- void TransferFocus(in ODTypeToken focus,
- in ODFrame transferringFrame,
- in ODFrame newOwner);
-
- void TransferFocusSet(inout ODFocusSet focusSet,
- in ODFrame transferringFrame,
- in ODFrame newOwner);
-
- ODFrame GetFocusOwner(in ODTypeToken focus);
-
- ODFocusOwnerIterator CreateOwnerIterator(in ODTypeToken focus);
-
- void RegisterFocus(in ODTypeToken focus,
- in ODFocusModule focusModule);
-
- void UnregisterFocus(in ODTypeToken focus);
-
- ODBoolean IsFocusRegistered(in ODTypeToken focus);
-
- ODBoolean IsFocusExclusive(in ODTypeToken focus);
-
-
- #ifdef __SOMIDL__
- implementation
- {
- override:
- somInit,
- somUninit,
- Purge;
- releaseorder:
- RequestFocusSet,
- RequestFocus,
- RelinquishFocusSet,
- RelinquishFocus,
- TransferFocus,
- TransferFocusSet,
- GetFocusOwner,
- CreateOwnerIterator,
- RegisterFocus,
- UnregisterFocus,
- IsFocusRegistered,
- IsFocusExclusive,
- reserved1,
- reserved2,
- reserved3,
- reserved4,
- reserved5,
- reserved6;
-
- majorversion = 1; minorversion = 0;
-
-
- };
- #endif
- };
-
- #endif // _ARBITRAT_
-